import { request } from '@/utils/request';
import { stringify } from 'qs';


//menu
export async function queryProductAll(): Promise<responseData> {
  return request(`/scan/qrcode/meal/product/all`)
}

//store 门店详情
export async function queryStoreDetail(id: number): Promise<responseData> {
  return request(`/scan/qrcode/meal/store/${id}`)
}

// 根据门店Id和codeId 获取二维码信息
export async function queryConsumerCode(id: number): Promise<responseData> {
  return request(`/scan/qrcode/meal/code/consumer/${id}`)
}

// 查询预约时间段
export async function queryPretime():Promise<responseData> {
  return request('/scan/qrcode/meal/bespeaktime/consumer?bespeakType=1')
}

// 查询预约时间段
export async function queryMealTime(braId:string):Promise<responseData> {
  return request(`/scan/qrcode/meal/business/time/mealTime?braId=${braId}`)
}

//獲取門店所有的設置
export async function queryStoreOptionList(): Promise<responseData> {
  return request('/scan/qrcode/meal/advanced/option/list')
}

//是否是先吃後附
export async function queryIsEatFrist(): Promise<responseData> {
  return request('/scan/qrcode/meal/order/isfirsteat')
}

//查询商品
export async function queryProducts(data: any):  Promise<responseData>{
  return request(`/scan/qrcode/meal/product/search`, {
    method: 'POST',
    data
  })
}
